package com.blensmile.activity;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.blensmile.BaseActivity;
import com.blensmile.utils.LogUtils;
import com.blensmile.R;

public class Main2Activity extends BaseActivity {

    private static final String Tag = "B";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        View tvClick = findViewById(R.id.tv_click);
        tvClick.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Intent intent = new Intent(/*Main2Activity.this,MainActivity.class*/);
//                intent.putExtra("hello",1);
//                intent.putExtra("helloworld",false);
//                intent.putExtra("emoty","empty");
//                setResult(Activity.RESULT_OK,intent);
//                finish();
                Intent intent = new Intent(Main2Activity.this,MainActivity.class);
                startActivity(intent);
            }
        });
        findViewById(R.id.tv_click2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Main2Activity.this,MediaPlayerTestActivity.class);
                startActivity(intent);
            }
        });
        LogUtils.b(Tag+" onCreate");
    }

    @Override
    protected void onStart() {
        super.onStart();
        LogUtils.b(Tag+" onStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        LogUtils.b(Tag+" onResume");
//        LogUtils.b("TextSize:"+DensityUtils.px2dip(this,tvShow.getTextSize())+" height:"+DensityUtils.px2dip(this,tvShow.getMeasuredHeight()));
    }

    @Override
    protected void onPause() {
        super.onPause();
        LogUtils.b(Tag+" onPause");
    }

    @Override
    protected void onStop() {
        super.onStop();
        LogUtils.b(Tag+"onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        LogUtils.b(Tag+" onDestroy");
    }

    @Override
    protected void onRestart() {
        super.onRestart();
        LogUtils.b(Tag+" onRestart");
    }

}
